#ifndef GROUPRECEIVEFILE_H
#define GROUPRECEIVEFILE_H

#include <QThread>
#include <boost/function.hpp>
extern "C"
{
#include <winsock2.h>
}

class GroupReceiveFile : public QThread
{
public:
	GroupReceiveFile(const sockaddr_in &groupLeaderAddress, const QString &fileName, long long fileSize,
					 boost::function<void (void)> callbackFunc = boost::function<void (void)>()):
			m_GroupLeaderAddress(groupLeaderAddress),
			m_FileName(fileName),
			m_FileSize(fileSize),
			m_CallbackFunc(callbackFunc)
	{

	}
protected:
	void run();
private:

private:
	sockaddr_in		m_GroupLeaderAddress;
	QString			m_FileName;
	long long		m_FileSize;
	boost::function<void (void)> m_CallbackFunc;
};

#endif // GROUPRECEIVEFILE_H
